Copyright: Copyright ©J. Calitz


Printit Help Contents
Printit - Form and Window Printing Module

The Components

   TPrintWin

   THRuler

   TVRuler

  TShowTotal

The Print Viewer

 The Print Viewer

Additional Information

 Product Information

 Order Information

 3rd Party Product Support

 Multi-Language Support

 Product Support

About


Ordering Information
ORDER FORM

Orders must be placed by filling out the necessary order forms - see icons in PrintIt! group.


Product Information

Overview

Printit is a set of Visual Component Library Classes that makes printing easy for the Delphi programmer. Programming to print was always a difficult task for the programmer. Even in Delphi printing is still a problem.

 If you want to print a report you must use a report generator. A report generator has the following disadvantages:

* It is slow to start up.

* It must be set up separately from your application

* If something changes in your original Query or Table then the report must be adjusted as well.

* It is not part of your application and a Run Time Version of the Report Generator is normally  supplied with you application.

Report Generators are generally quite flexible when it comes to creating a variety of different reports.

If you want to print a form e.g. an Invoice or Job Card, it becomes more difficult with a Report Generator because of the disadvantages mentioned above.

Enter - Printit

Printit can remove the above disadvantages because Printit is a set of components that are linked into your executable.

* Printit needs no licensing to end users. Only developers must have a license.

* Printit can make use of your Query and Table components. If your table or Query changes then PrintIt knows about the changes because Printit uses you Table or Query components as input.

* Printit can also print selected windows as they appear or mix them with Tables and/or Queries as required.

* Printit can mix graphics with your text or tables and draw lines, rectangles, circles, ellipses etc. and fill them with any color and/or use a pattern for all solid figures.

* Printit can change the headings of reports and use color as required.

* Printit has a preview utility to view any page before printing. The Viewer has built-in Zoom and Scroll facilities. The Viewer is very fast and optimized for screen redraw and printing.

* No extra DLL is necessary.

* Printit becomes part of your executable.


TPrintWin Methods DrawEllipse
DrawEllipse Method

Applies to

TPrintWin Component

Declaration

procedure DrawEllipse( x1, y1, x2, y2: Real );

Description

The DrawEllipse method draws an ellipse defined by a bounding rectangle on the printer. The top-left point of the bounding rectangle is at Inches or Centimetre coordinates (x1, y1) and the bottom-right point is at (x2, y2). If the points of the rectangle form a square, a circle is drawn.  Measurements are in Inches or Centimetre depending on the setting of Units.


DrawTableInRect
DrawTableInRect Method

Applies to

TPrintWin Component

Declaration

procedure DrawTableInRect( x1,y1,x2,y2: Real; Table: TTable;

         XMinimize: Boolean; PrintTotals: Boolean);

Description

Draws the contents of a TTable and scale it to fit in a rectangle bounded by x1,y1,x2,y2

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin
  TPrintWin Component

Properties	Methods	Events	Types

Unit

PrnWin

Description

The PrintWin component is used to print any mix of lines, rectangles, Tables, Queries, contents of windows, text etc.. By using the Fields Editor, the programmer can determine which fields of tables or queries are going to be printed. The programmer can hide controls which should not be printed or print tables or queries which only has a TTable or TQuery component without a visual component.

Numerous settings can be applied to change the appearance of the PrintWin component.  Fonts, Colors and brushes can be changed as deemed necessary. Use the FooterEnabled , FooterFilled , FooterLine, FooterOutlined, FooterString, FooterTop properties to format and display the footer. Use the HeaderEnabled , HeaderFilled , HeaderLine, HeaderOutlined, HeaderString, HeaderTop properties to format and display the header

The BorderTop, BorderLeft and BorderRight properties determine the borders. The LineSpacing property determine the distance between 2 lines when printing the contents of a window.

The PrintWin methods can be split into 2 groups.

1. The absolute control group

These include the basic drawing methods like methods for drawing lines, text, rectangles, pies, arcs, bitmaps, grids, windows and their contents, Tables, Queries, etc. With this group the programmer must decide by using the NewPage method when to go onto a new page. Each page can have as many components as the programmer desire. The drawbacks of this group are the follow:

a. The programmer has to do more programming than group 2.

b. Tables and Queries currently cannot continue onto a second page - so the contents must fit on one page or will be clipped at the edge of the page.

2. The automatic print group

The main method of this group is the DrawWindowMultiple method. It takes as arguments the offset onto a page and the TWinControl that contains the components that must be printed. This TWinControl can be one of the following:

TForm,

TPanel

TScrollBox

TNotebook

All supported components on these pages will be printed


TPrintGridReport BorderRight
BorderRight Property

Applies to

TPrintWin component

Declaration

property BorderRight: double

Description

Indicates the border on the right side of the page where there should be no printing. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport BorderLeft
BorderLeft Property

Applies to

TPrintWin component

Declaration

property BorderLeft: double

Description

Indicates the border on the left side of the page where there should be no printing. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport Brush
Brush Property

Applies to

TPrintWin Component

Declaration

property Brush: TBrush;

Description

Indicates the brush which should be used for the background and for filling in objects e.g. rectangles, arcs, etc. Please note that if a component has a brush property then that will be used instead.


TPrintGridReport TextColor
TextColor Property

Applies to

TPrintWin component

Declaration

property TextColor:  TColor;

Description

TheTextColor property determines the color of the text characters.


TPrintGridReport FooterEnabled
FooterEnabled Property

Applies to

TPrintWin components

Declaration

property FooterEnabled:  Boolean

Description

Indicate if the footer should print on the page. The default value is True;


TPrintGridReport FooterFilled
FooterFilled Property

Applies to

TPrintWin Component

Declaration

property FooterFilled:  Boolean

Description

Indicate if the footer should be filled with the current brush. The default value is False


THRuler
 THRuler Component

Properties	Methods	Events

Unit HRuler

Description

The TVRuler and THRuler components are used primarily in the design stage of a project. They are Vertical and horizontal rulers which can be set for Inches or Centimetre.  They are normally used together with the GridBackDrop and GridBackdropUnits properties of TPrintWin component.

They can be set on Panels, ScrollBoxes, Forms etc.


TPrintGridReport FooterLeft
FooterLeft Property

Applies to

TPrintWin components

Declaration

property FooterLeft: double

Description

Indicate the left starting position of the footer.  Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport FooterLine
FooterLine Property

Applies to

TPrintWin components

Declaration

property FooterLine: Boolean

Description

Indicate if the footerline should be printed. The default value is True.


TPrintGridReport FooterOutlined
FooterOutlined Property

Applies to

TPrintWin components

Declaration

property FooterOutlined:  Boolean;

Description

Indicate if the footer should be outlined with the current pen. The default value is False.


TPrintGridReport FooterString
FooterString Property

Applies to

TPrintWin components

Declaration

property FooterString:  String

Description

Indicate the string that should appear as the Footer.


TPrintGridReport FooterTop
FooterTop Property

Applies to

TPrintWin components

Declaration

property FooterTop:  double

Description

Indicates the top position  where the footer should start printing. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport HeaderEnabled
HeaderEnabled Property

Applies to

TPrintWin components

Declaration

property HeaderEnabled:  Boolean

Description

Indicate if the header should print on the page. The default value is True;


TPrintGridReport HeaderFilled
HeaderFilled Property

Applies to

TPrintWin components

Declaration

property HeaderFilled:  Boolean

Description

Indicate if the header should be filled with the current brush. The default value is False


TPrintGridReport HeaderLeft
HeaderLeft Property

Applies to

 TPrintWin components

Declaration

property HeaderLeft: double;

Description

Indicate the left starting position of the header. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport HeaderLine
HeaderLine Property

Applies to

TPrintWin components

Declaration

property HeaderLine:  Boolean

Description

Indicate if the header line should be printed. The default value is True.


TPrintGridReport HeaderOutlined
HeaderOutlined Property

Applies to

TPrintWin components

Declaration

property HeaderOutlined:  Boolean

Description

Indicate if the header should be outlined with the current pen. The default value is False.


TPrintGridReport HeaderString
HeaderString Property

Applies to

TPrintWin components

Declaration

property HeaderString:  String

Description

Indicate the string that should appear as the Header.


TPrintGridReport HeaderTop
HeaderTop Property

Applies to

TPrintWin components

Declaration

property HeaderTop: double

Description

The HeaderTop property determines the vertical coordinate of the top edge of the Header if the header is to be printed. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintGridReport Name
Name Property

Applies to

TPrintWin components

Declaration

property Name: TComponentName;

Description

The Name property contains the name of the component as referenced by other components. By default, Delphi assigns sequential names based on the type of the component, such as 'Button1', 'Button2', and so on. You may change these to suit your needs.

Note:	Change component names only at design time.


XOffset Property

Applies to

THRuler component

Declaration

property XOffset: Real;

Description

Indicates the distance from the left of the parent window. If negative then only the positive part of the ruler will be displayed. It displayes measurements in Inches or Centimetre depending on the settings of the Units property.


TPrintGridReport Pen
Pen Property

Applies to

TPrintWin Component

Declaration

property Pen:  TPen;

Description

A canvas object's Pen property determines what kind of pen the canvas uses for drawing lines and shape outlines.


TPrintWin Methods Bold
Bold Method

Applies to

TPrintWin Component

Declaration

procedure Bold;

Description

Changes the current fort to Bold All other attributes remain the same.


THRuler Properties

XOffset

Units

AlignRuler


TPrintGridReport Tag
Tag Property

Applies to

TPrintWin component

Declaration

property Tag:  LongInt

Description

The Tag property is available to store an integer value as part of a component. This is the default Delphi Tag property which the user can use.


DrawQueryInRect
DrawQueryInRect Method

Applies to

TPrintWin Component

Declaration

procedure DrawQueryInRect x1,y1,x2,y2: Real; Table: TTable;

         XMinimize: Boolean; PrintTotals: Boolean);

Description

Draws the contents of a TQuery and scale it to fit in a rectangle bounded by x1,y1,x2,y2

Measurements are in Inches or Centimetre depending on the setting of Units.


OutputTo
OutputTo Property

Applies to

TPrintWin components

Declaration

property OutputTo TOutput;

Description

Indicates where the output will be sent to. This can take on the values of poPrinter or poViewer.


GridBackDropUnits
GridBackDropUnits Property

Applies to

TPrintWin Component

Declaration

property GridBackDropUnits: TUnits;

Description

Indicates the units which must be used when printing the backdrop rulers. It can be poInches or poCentimetres. See also GridBackDrop.


HRuler
 TVRuler Component

Properties	Methods	Events

Unit VRuler

Description

The TVRuler and THRuler components are used primarily in the design stage of a project. They are Vertical and horizontal rulers which can be set for Inches or Centimetre.  They are normally used together with the GridBackDrop and GridBackdropUnits properties of TPrintWin component.

They can be set on Panels, ScrollBoxes, Forms etc.


PageWidth
PageWidth Method

Applies to

TPrintWin Component

Declaration

 function  PageWidth: Real;

Description

Returns the Width of the page on the printer in Inches or Centimetre depening on the setting of Units


TPrintGridReport OnAfterPrint
OnAfterPrint Event

Applies to

TPrintWin component

Declaration

property OnAfterPrint: TNotifyEvent;

Description

The OnAfterPrint event occurs after the complete Report has been printed. Your application can use this event to do any necessary cleanup.


TPrintGridReport OnBeforePrint
OnBeforePrint Event

Applies to

TPrintWin component

Declaration

property OnBeforePrint:  TNotifyEvent;

Description

The OnBeforePrint event occurs before anything has been printed. Your application can use this event to do any necessary initialization.


TPrintGridReport OnNewPage
OnNewPage Event

Applies to

TPrintWin component

Declaration

property OnNewPage:  TNotifyEvent;

Description

The OnNewPage: event occurs before a new page starts printing. Your application can use this event to do any necessary cleanup per page.


TPrintGridReport OnPrint
OnPrint Event

Applies to

TPrintWin component

Declaration

property OnPrint:  TNotifyEvent;

Description

The OnPrint event occurs before printing starts for each page. Your application can use this event to do any necessary initialization


TPrintGridReport OnPrintHeader
OnPrintHeader Event

Applies to

TPrintWin component

Declaration

property OnPrintHeader: TNotifyEvent;

Description

The OnPrintHeader event occurs before the header is printed. Your application can use this event to do any necessary initialization


TPrintGridReport OnPrintFooter
OnPrintFooter Event

Applies to

TPrintWin component

Declaration

property OnPrintFooter: TNotifyEvent;

Description

The OnPrintFooter event occurs before the footer is printed. Your application can use this event to do any necessary initialization


TPrintGridReport OnPrintTable
OnPrintPage Event

Applies to

TPrintWin Component

Declaration

property OnPrintTable TNotifyEvent;

Description

The OnPrintTable event occurs before a table or query is printed. Your application can use this event to do any necessary initialization


TPrintGridReport OnPrintPage
OnPrintPage Event

Applies to

TPrintWin component

Declaration

property OnPrintPage: TNotifyEvent;

Description

The OnPrintPage event occurs before the page is printed. Your application can use this event to do any necessary initialization


DateTimeStampEnabled
DateTimeStampEnabled Property

Applies to

TPrintWin components

Declaration

property DateTimeStampEnabled Boolean

Description

Indicates if the DateTimeStamp must appear on the left bottom of the printout. The default value is True


TPrintWin Methods DrawQueryAt
DrawQueryAt Method

Applies to

TPrintWin Component

Declaration

procedure DrawQueryAt( XOffset: Real;  YOffset: Real; Query TQuery; XMinimize: Boolean; PrintTotals: Boolean);

Description

The DrawQueryAt method draws  the Query on the printer starting at position XOffset,YOffset from the left and top of the printer page.

If XMinimize is True then TPrintWin will optimize the size of the Query horizontally.

If PrintTotals is True then totals will be printed at the end of the Query

DrawQuery currently cannot continue on a new page.


ViewHeading
ViewHeading Property

Applies to

TPrintWin Component

Declaration

property ViewHeading: string;

Description

Indicates the Window header when using the Print Viewer.


TPrintWin Methods BeginPrint
BeginPrint Method

Applies to

TPrintWin Component

Declaration

procedure BeginPrint;

Description

This method should be the first method to be called for TPrintWin. It Initializes the necessary variables to be able to print.


FixSansSerif
FixSansSerif Property

Applies to

TPrintWin Component

Declaration

property FixSansSerif:  Boolean

Description

If set to True then all occurences of MS Sans Serif fonts will be replaced with Arial. This is done because the MS Sans Serif Font does not scale very well.


TVRuler
 TVRuler Component

Properties	Methods	Events

Unit VRuler

Description

The TVRuler and THRuler components are used primarily in the design stage of a project. They are Vertical and horizontal rulers which can be set for Inches or Centimetre.  They are normally used together with the GridBackDrop and GridBackdropUnits properties of TPrintWin component.

They can be set on Panels, ScrollBoxes, Forms etc.


TotalType
TotalType Property

Applies to

TShowTotal Component

Declaration

property TotalType: TTotals;

Description

Indicates what the type of the output will be. The values can be

tPageTotal,   	- a Page Total of a specific field in a TDBGrid will be displayed - Used ONLY with DrawWindowMultiple

tAccTotal,   	- a Running Total of a specific field in a TDBGrid will be displayed - Used ONLY with DrawWindowMultiple

tPageNumber, 	- The Current Page number will be displayed

tDate, 	- The Current Date will be displayed

tTime,	- The Current Time will be displayed

tText	- The text in the property Text will be displayed


TPrintWin Properties

BorderLeft	FrameStyle	LineSpacing

BorderRight	GridBackDrop	LineWidth

BorderTop	GridBackDropUnits	Name

Brush	HeaderEnabled	Orientation

DateTimeStampEnabled	HeaderFilled	OutputTo

FixSansSerif	HeaderFont	PageNumberEnabled

FooterEnabled	HeaderLeft	Pen

FooterFilled	HeaderOutlined	Tag

FooterFont	HeaderStringCenter	Units

FooterOutlined	HeaderStringLeft	ViewBkColor

FooterString	HeaderStringRight	ViewHeading

FooterTop	HeaderTop	ZoomPercentage

FrameObjects	Interrupted


TPrintWin Methods

BeginPrint

BitBlt

Bold

DrawArc

DrawEllipse

DrawGrid

DrawLine

DrawPie

DrawQuery

DrawQueryAt

DrawQueryInRect

DrawQueryRecord

DrawRect

DrawRectAt

DrawRoundRect

DrawTable

DrawTableAt

DrawTableInRect

DrawTableRecord

DrawText

DrawTextAt

DrawThickThick

DrawThickThin

DrawThinThick

DrawThinThin

DrawWindow

DrawWindowAt

DrawWindowInRect

DrawWindowMultiple

EndPrint

FrameTableRecord

FrameWindow

GetFontColor

GetFontHeight

GetFontName

GetPageTotal

GetControlHeight

GetControlWidth

GetPageHeight

GetPageWidth

GetTextHeight

GetTextWidth

GetRunningTotal

GetWindowBottom

Interrupted

IsBold

IsItalic

IsUnderline

Italic

NewFont

NewPage

Normal

PageHeight

PageWidth

PrintBitmap

SelectFont

SelectHatchedBrush

SelectPen

SelectSolidBrush

SetColumnWidth

SetFillObjects

SetFrameStyle

SetTheTextColor

Underline


TPrintWin Events

OnAfterPrint

OnBeforePrint

OnNewPage

OnPrint

OnPrintFooter

OnPrintHeader

OnPrintPage


TPrintWin FrameObjects
FrameObjects Property

Applies to

TPrintWin components

Declaration

property FrameObjects: Boolean;

Description

Indicates if objects are to be framed. The default is True.


TPrintWin FrameStyle
FrameStyle Property

Applies to

TPrintWin components

Declaration

property FrameStyle: TFrameStyle;

Description

Determines the style of frame which will be drawn around objects. Valid values are

frThin

frThinThin

frThinThick

frThickThin

frThickThick


TPrintWin Methods DrawArc
DrawArc Method

Applies to

TPrintWin Component

Declaration

procedure DrawArc( x1, y1, x2, y2 ,x3, y3, x4, y4 : Real );

Description

The DrawArc method draws an arc on the printer along the perimeter of the ellipse bounded by the specified rectangle. Coordinates x1 y1 and x2 y2 define the enclosing rectangle for the arc. The arc starts at the intersection of the ellipse edge and the line from the center of the ellipse to the specified starting point x3 y3 The arc is drawn counterclockwise until it reaches the position where the ellipse edge intersects the line from the center of the ellipse to the specified ending point x4 y4. Measurements are in Inches or Centimetre depending on the setting of Units.


TVRuler Properties

Yoffset

Units

AlignRuler


LineWidth
LineWidth Property

Applies to

TPrintWin components

Declaration

property LineWidth:  Integer;

Description

Determines the width of the line which is used for drawing. The default is 1.


PrintBitmap
PrintBitmap Method

Applies to

TPrintWin Component

Declaration

procedure procedure PrintBitmap(XOffset: Real;  YOffset: Real;  Width: Real; Height: Real;  Bitmap: TBitmap);

Description

Draws a Bitmap by using a TBitmap. If Width and Height are both 0 then then Height and Width of the bitmap will be used as read from the file.

If Height and Width are not 0 then the bitmap will be stretched to fit the rectangle

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin BorderTop
BorderTop Property

Applies to

TPrintWin components

Declaration

property BorderTop:  Real

Description

Indicates the border in Inches or Centimetre on the top side of the page where there should be no printing.

Measurements are in Inches or Centimetre depending on the setting of Units.


Alignment
Alignment Property

Applies to

TShowTotal Component

Declaration

property Alignment: TAlignment;

Description

Indicates the alignment of the text in the control. Valid values are:

taLeftJustify

taCenter

taRightJustify


ShowOn
ShowOn Property

Applies to

TShowTotal Component

Declaration

property ShowOn:  TShow;

Description

Indicates on which pages of the printed output this specific component should be displayed Valid values are:

  	tFirstPage

tLastPage

tAllPages

tAllButFirst

tAllButLast

  	tFirstAndlast

tAllButFirstAndLast


AlignRuler
AlignRuler Property

Applies to

THRuler and TVRuler component

Declaration

property AlignRuler: Boolean;

Description

When clicked on this property, the ruler will be align to the top-left corner of the parent window.


Multi Language Support

Applies to

TPrintWin component

Description

Multi Language Support allows the programmer to change the text on the buttons and Dialog boxes which are used in the Viewer.

To change the langauge do the following:

Make sure that the DELPHI\BIN directory is on your path for the resource compiler BRC.EXE to work

 Edit the file named STRING.RC in the Printtit component directory

 Compile the file with the Borland Resource compiler e.g.

      BRC  -r STRING.RC

 Include the generated .RES file in your main application

      {$R STRING.RES}

(The best is to include it like this

implementation

{$R *.DFM}

{$R STRING.RES}

 Recompile and link your application


PageHeight
PageHeight Method

Applies to

TPrintWin Component

Declaration

 function  PageHeight Real;

Description

Returns the Height of the page on the printer in Inches or Centimetre depening on the setting of Units


GetPageTotal
GetPageTotal Method

Applies to

TPrintWin Component

Declaration

function  GetPageTotal  ( Grid: TCustomGrid; ColumnName: string): Real;

Description

Returns a page total of a column in a TDBGrid of the current page. The total is already available at the beginning of the page. This option is used together with the DrawWindowMultiple method which is used to print Invoices, statements ,etc. The total is also available if a TShowTotal component is used.


DrawWindowInRect
DrawWindowInRect Method

See Also

DrawWindowAt,  DrawWindowMultiple

Applies to

TPrintWin Component

Declaration

procedure   DrawWindowInRect (x1,y1,x2,y2: Real; Control: TWinControl);

Description

The DrawWindowInRect method draws the contents of a window onto the printer scaling it to fit in the rectangle defined by the corners x1,y1,x2,y2. These measurements are in Inches or Centimetre depending on the setting of Units.

This method currently supports the drawing of supported drawing components directly from the screen.

The same rules for drawing windows onto the printer applies as for DrawWindowAt


LineSpacing
LineSpacing Property

Applies to

TPrintWin components

Declaration

property LineSpacing: String

Description

Indicates the distance between two lines. A value of 1.0 would insert the height of the text in between the two lines.


Color
Color Property

Applies to

TShowTotal Component

Declaration

property Color: TColor;

Description

Indicates the background color for a component.


GetTextWidth
GetTextWidth Method

Applies to

TPrintWin Component

Declaration

function GetTextWidth (str: string): Real;

Description

Returns the Width of the string in Inches or Centimetre depending on the setting of Units.


FooterFont
FooterFont Property

Applies to

TPrintWin Components

Declaration

property FooterFont: TFont;

Description

Indicates the font that will be used to print the Footer at the bottom of the page.


TPrintWin Methods Create
Create Method

Applies to

TPrintWin Component

Declaration

constructor Create;

Description

The Create method allocates memory to create the object and initializes its data as needed. Each object can have a Create method customized to create that particular kind of object.


Units
Units Property

Applies to

TPrintWin Component

Declaration

property Units: TUnits;

Description

Indicates the measurement system which must be used. Allowed values are:

poInches

poCentimetres


ViewBkColor
ViewBkColor Property

Applies to

TPrintWin Component

Declaration

property ViewBkColor: TColor;

Description

Indicates the background color which will be used when using the Print Viewer .


TPrintWin Methods DrawLine
DrawLine Method

Applies to

TPrintWin Component

Declaration

procedure DrawLine( XFrom: Real;  YFrom: Real;  XTo:   Real;  YTo:   Real);

Description

Draws a line on the Printer from position XFrom, YFrom to XTo, YTo. Measurements are in Inches or Centimetre depending on the setting of Units.


3rd Party Product Support

Applies to

TPrintWin Component

TPrintWin currently uses a TDBGrid as the starting point of its information gathering process when it uses any of the window printing methods that can print a grid e.g. DrawWindowMultiple. It looks at the DataSource connected to the TDBGrid and then looks at the DataSet property of the DataSource to determine the TTable or TQuery from which the information must flow.

Suppliers of grid components which are derived from a lower level e.g. from TCustomGrid can contact us to supply print support in the TPrintWin component for their products.


Visible
Visible Property

Applies to

TShowTotal Component

Declaration

property Visible: Boolean

Description

Indicates if a component should be displayed on the form.


SetColumnWidth
SetColumnWidth Method

Applies to

TPrintWin Component

Declaration

procedure   SetColumnWidth ( Grid: TCustomGrid; ColumnName: string; Width: Real);

Description

The SetColumnWidth method is used to set the absolute width of TDBGrid on the printer. It is used together with the DrawWindowMultiple method to align columns exactly. These measurements are in Inches or Centimetre depending on the setting of Units.

Example

PrintWin1.SetColumnWidth ( DBGrid1, 'ItemNo', 0.75);


Types

Unit

CB_Types

Description

All the types in TPrintWin are in unit CB_Types. If you are coming from an earlier version of Printit then please make sure that this unit is included.

The following types are used:

  TFrameStyle = 	(frThin, frThinThin, frThinThick,frThickThin, frThickThick);

  TPosition = 	(poLeft, poCenter, poRight);

  TUnits = 	(poInches, poCentimetres);

  TOutput = 	(poPrinter, poViewer);

  TOrient = 	(Default, Landscape, Portrait);

  TFrameStyles = 	(frNone, frSingleThick, frSingleThin, frDoubleThick, frDoubleThin,  frDoubleThickThin,frDoubleThinThick);

  TDBInput = 	(frTDBMemo);

  TPageLayout = 	(pl_1x1, pl_1x2, pl_1x3, pl_1x4, pl_2x2, pl_2x4);

  TPagesToPrint = 	(pAll, pOdd, pEven);


TPrintWin Methods DrawPie
DrawPie Method

Applies to

TPrintWin Component

Declaration

procedure DrawPie( x1, y1, x2, y2 ,x3, y3, x4, y4 : Real );

Description

The Pie method draws the section of an ellipse bounded by the rectangle (x1, y1) and (x2, y2) on the printer. The section drawn is determined by two lines radiating from the center of the ellipse through the points (x3, y3) and (x4, y4). Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawRect
DrawRect Method

Applies to

TPrintWin Component

Declaration

procedure DrawRect ( YFrom: Real YTo: Real Pos: TPosition; mWidth: Real

Description

The DrawRect method draws a rectangle on the printer between lines YFrom and YTo  All positions and Widths are measured in Inches or Centimetre. Pos may have any of the following values:

poLeft	- Rectangle will be left aligned

poCenter	- Rectangle will be center aligned

poRight	- Rectangle will be right aligned

mWidth determines the width of the rectangle in Inches or Centimetre.  DrawRect draws the rectangle using the current brush and pen attributes.

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawRectAt
DrawRectAt Method

Applies to

TPrintWin Component

Declaration

procedure DrawRectAt( XFrom: Real; YFrom: Real; XTo:  Real; YTo:Real);

Description

The DrawRectAt method draws a rectangle  with its upper-left corner at the point  (XFrom: YFrom) and its lower-right corner at the point (XTo, YTo) . DrawRectAt draws the rectangle using the current brush and pen attributes. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawRoundRect
DrawRoundRect Method

Applies to

TPrintWin Component

Declaration

procedure DrawRoundRect( X1, Y1, X2, Y2, X3, Y3: Real);

Description

The DrawRoundRect method draws a rectangle on a printer with the upper-left corner at (X1, Y1) and the lower-right corner at (X2, Y2), much as the Rectangle method does. However, DrawRoundRect draws the corners as quarters of an ellipse with the width of X3 and a height of Y3. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawTable
DrawTable Method

Applies to

TPrintWin Component

Declaration

procedure DrawTable( YOffset: Real;  Pos: TPosition; Table: TTable; XMinimize: Boolean; PrintTotals: Boolean);

Description

The DrawTable method draws  the Table on the printer starting at YOffset from the top of the printer page. Pos may have any of the following values:

poLeft	- Table will be left aligned

poCenter	- Table will be center aligned

poRight	- Table will be right aligned

If XMinimize is True then TPrintWin will optimize the size of the Table horizontally.

If PrintTotals is True then totals will be printed at the end of the Table. DrawTable currently cannot continue on a new page.

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawTableAt
DrawTableAt Method

Applies to

TPrintWin Component

Declaration

procedure DrawTableAt( XOffset: Real;  YOffset: Real;  Table: TTable; XMinimize: Boolean; PrintTotals: Boolean);

Description

The DrawTableAt method draws  the Table on the printer starting at position XOffset,YOffset from the top of the printer page.

If XMinimize is True then TPrintWin will optimize the size of the Table horizontally.

If PrintTotals is True then totals will be printed at the end of the Table. DrawTable currently cannot continue on a new page.

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawTableRecord
DrawTableRecord Method

Applies to

TPrintWin Component

Declaration

procedure DrawTableRecord( XOffset: Real;  YOffset: Real;  Table: TTable);

Description

The DrawTableRecord method draw the the current record of the Table vertically starting at position (XOffset, YOffset) Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawText
DrawText Method

Applies to

TPrintWin Component

Declaration

procedure DrawText( YOffset: Real;  Pos: TPosition; vText String);

Description

The DrawText method draws text on the printer starting at line position YOffset.. Pos may have any of the following values:

poLeft	- Text will be left aligned on the page

poCenter	- Rectangle will be center aligned on the page

poRight	- Rectangle will be right aligned on the page

vText is the text that will be printed.

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawTextAt
DrawTextAt Method

Applies to

TPrintWin Component

Declaration

procedure DrawTextAt( XOffset: Real;  YOffset: Real;  mText: String);

Description

The DrawTextAt method draws text with its upper-left corner at the point  (XOffset: YOffset). mText is the text that will be printed.

Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawTickThick
DrawThickThick Method

Applies to

TPrintWin Component

Declaration

procedure DrawThickThick (x1, y1, x2, y2 : Real);

Description

Draws 2 lines on the printer, one a 4-pixel wide line and the other a 4-pixel wide line. The line is drawn from point (x1,y1) to (x2,y2). The current pen is used. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawThickThin
DrawThickThin Method

Applies to

TPrintWin Component

Declaration

procedure DrawThickThin  (x1, y1, x2, y2 : Real);

Description

Draws 2 lines on the printer, one a 4-pixel wide line and the other a 1-pixel wide line. The line is drawn from point (x1,y1) to (x2,y2). The current pen is used. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawThinThick
DrawThinThick Method

Applies to

TPrintWin Component

Declaration

procedure DrawThinThick  (x1, y1, x2, y2 : Real);

Description

Draws 2 lines on the printer, one a 1-pixel wide line and the other a 4-pixel wide line. The line is drawn from point (x1,y1) to (x2,y2). The current pen is used. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawThinThin
DrawThinThin Method

Applies to

TPrintWin Component

Declaration

procedure DrawThinThin   (x1, y1, x2, y2 : Real);

Description

Draws 2 lines on the printer, one a 1-pixel wide line and the other a 1-pixel wide line. The line is drawn from point (x1,y1) to (x2,y2). The current pen is used. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods DrawWindow
DrawWindow Method

Applies to

TPrintWin Component

Declaration

procedure DrawWindow( YOffset: Real;  Pos: TPosition;  Control: TWinControl);

Description

The DrawWindow method draws the contents of a window onto the printer starting at position YOffset.. Pos may have any of the following values:

poLeft	- Window will be left aligned on the page

poCenter	- Window will be center aligned on the page

poRight	- Window will be right aligned on the page

Measurements are in Inches or Centimetre depending on the setting of Units.

This method currently supports the drawing of supported drawing components directly from the screen.


TPrintWin Methods DrawWindowAt
DrawWindowAt Method

Applies to

TPrintWin Component

Declaration

procedure DrawWindowAt( XOffset: Real;  YOffset: Real; Control: TWinControl);

Description

The DrawWindowAt method draws the contents of a window onto the printer starting at position point (XOffset,YOffset). Measurements are in Inches or Centimetre depending on the setting of Units.

Some components are ignored e.g. buttons, menus, scrollbars and non-visual components.

Normally the component that is passed over as the TWinControl is a TScrollBox, TForm or TPanel. All components contained within this TWinControl will be drawn.The vertical distance between edit controls can be set with the LineSpacing property. More than 1 window can be drawn to a printer page. Windows cannot currently continue onto the next page. More than 1 page can be drawn by using the NewPage Method.

This method currently supports the drawing of supported drawing components directly from the screen.

Comboboxes are not drawn in their pull-down state.

TImage and TDBImage currently can only contain bitmaps and not Icons or Windows meta files. These will be supported in a future release.

Measurements are in Inches or Centimetre depending on the setting of Units.

Additional components are constantly added. If you have a special requirement not covered by the above please let us know.


TPrintWin Methods EndPrint
EndPrint Method

Applies to

TPrintWin Component

Declaration

procedure EndPrint;

Description

The EndPrint method must be called at the end of print to close printing.


TPrintWin Methods FrameTableRecord
FrameTableRecord Method

Applies to

TPrintWin Component

Declaration

procedure FrameTableRecord( XOffset: Real;  YOffset: Real;  Table: TTable);

Description

Draws a frame around a record printed with DrawTableRecord.  Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods FrameWindow
FrameWindow Method

Applies to

TPrintWin Component

Declaration

procedure FrameWindow( XOffset: Real;  YOffset: Real;  Control: TWinControl);

Description

Draws a frame around a window printed with DrawWindowAt. Measurements are in Inches or Centimetre depending on the setting of Units.


TPrintWin Methods GetFontColor
GetFontColor Method

Applies to

TPrintWin Component

Declaration

function  GetFontColor: TColorRef;

Description

Retrieves the current font color.


TPrintWin Methods GetFontHeight
GetFontHeight Method

Applies to

TPrintWin Component

Declaration

function  GetFontHeight: Integer;

Description

Retrieves the current font height


TPrintWin Methods GetFontName
GetFontName Method

Applies to

TPrintWin Component

Declaration

function  GetFontName: String;

Description

Retrieves the current font name.


ZoomPercentage
ZoomPercentage Property

Applies to

TPrintWin components

Declaration

property ZoomPercentage: double

Description

Indicates the percentage zoom in the Viewer. Default is 100.


TPrintWin Methods GetWindowBottom
GetWindowBottom Method

Applies to

TPrintWin Component

Declaration

function  GetWindowBottom( XOffset: Integer; YOffset: Integer; Control: TWinControl): Integer;

Description

Retrieves the bottom of a window in pixels..


TPrintWin Methods IsBold
IsBold Method

Applies to

TPrintWin Component

Declaration

function  IsBold: Boolean;

Description

Returns True if the current font is set to bold.


TPrintWin Methods IsItalic
IsItalic Method

Applies to

TPrintWin Component

Declaration

function  IsItalic: Boolean;

Description

Returns True if the current font is set to italic


TPrintWin Methods IsUnderline
IsUnderline Method

Applies to

TPrintWin Component

Declaration

function  IsUnderline: Boolean;

Description

Returns True if the current font is set to underline


TPrintWin Methods Italic
Italic Method

Applies to

TPrintWin Component

Declaration

procedure Italic;

Description

Changes the current font to Italic. All other attributes remain the same.


TPrintWin Methods NewFont
NewFont Method

Applies to

TPrintWin Component

Declaration

procedure NewFont (Name: String; Height: Integer; nBold: Boolean; nItalic: Boolean; nUnderLine: Boolean);

Description

Selects a new font to print text with.


TPrintWin Methods NewPage
NewPage Method

Applies to

TPrintWin Component

Declaration

procedure NewPage;

Description

Generates a form feed to the printer. It should be called if the programmer wants to draw on a new page.


TPrintWin Methods DrawQuery
DrawQuery Method

Applies to

TPrintWin Component

Declaration

procedure DrawQuery( YOffset: Real;  Pos: TPosition; Query: TQuery; XMinimize: Boolean; PrintTotals: Boolean);

Description

The  DrawQuery method draws  the Query on the printer starting at YOffset from the top of the printer page. Pos may have any of the following values:

poLeft	- Table will be left aligned

poCenter	- Table will be center aligned

poRight	- Table will be right aligned

If XMinimize is True then TPrintWin will optimize the size of the Query horizontally.

If PrintTotals is True then totals will be printed at the end of the Query DrawTable currently cannot continue on a new page.

YOffset is measured in Inches or Centimetre depending on Units


TPrintWin Methods Normal
Normal Method

Applies to

TPrintWin Component

Declaration

procedure Normal;

Description

Changes the current font to Normal All other attributes remain the same.


TPrintWin Methods SelectFont
SelectFont Method

Applies to

TPrintWin Component

Declaration

procedure SelectFont (Name: String; Height: Integer);

Description

Select a new font.


TPrintWin Methods SelectHatchedBrush
SelectHatchedBrush Method

Applies to

TPrintWin Component

Declaration

procedure SelectHatchedBrush (Color: Longint; Hatch: Integer);

Description

Selects a hatched brush as the current brush. Valid values for Hatch are

      HS_BDIAGONAL

      HS_FDIAGONAL

      HS_CROSS

      HS_DIAGCROSS

      HS_HORIZONTAL

      HS_VERTICAL


TPrintWin Methods SelectPen
SelectPen Method

Applies to

TPrintWin Component

Declaration

procedure SelectPen (Width:Integer; Color: TColorRef);

Description

Selects a new pen as the current pen.


TPrintWin Methods SelectSolidBrush
SelectSolidBrush Method

Applies to

TPrintWin Component

Declaration

procedure SelectSolidBrush (Color: Longint);

Description

Select a new solid brush as the current brush.


TPrintWin Methods SetFillObjects
SetFillObjects Method

Applies to

TPrintWin Component

Declaration

procedure SetFillObjects (Fill: Boolean);

Description

Indicates if objects e.g. arcs should be filled with the current brush.


TPrintWin Methods SetFrameStyle
SetFrameStyle Method

Applies to

TPrintWin Component

Declaration

procedure SetFrameStyle( Style: TFrameStyle );

Description

Sets the frame which will be used to draw certain objects. Options are:

frThin, frThinThin, frThinThick,frThickThin or  frThickThick


TPrintWin Methods SetTheTextColor
SetTheTextColor Method

Applies to

TPrintWin Component

Declaration

procedure SetTheTextColor (Color: TColorRef);

Description

Sets the color which will be used for printing text.


TPrintWin Methods Underline
Underline Method

Applies to

TPrintWin Component

Declaration

procedure Underline;

Description

Changes the current font to underline All other attributes remain the same.


SourceGrid
SourceGrid Property

Applies to

TShowTotal Component

Declaration

property SourceGrid: TDBGrid;

Description

Indicates the TDBGrid which will be used to determine how many pages should be output e.g. on an Invoice. It is ONLY used together with the DrawWindowMultiple method of TPrintWin. The SourceField property must also be set. If this property is used then property TotalType should be set to either tPageTotal (which will display the PageTotal for the specific field) or to  tAccTotal (which will display a running total of the specific field). These totals are calculated at the beginning of the page.


 TShowTotal Component

Properties

Unit Totals

Description

The TShowTotal component is used (usually together with the DrawWindowMultiple method of TPrintWin ) to generate output to the printer. This component can output page and running totals for each column in a TDBGrid. This option is currently ONLY available when used together with the DrawWindowMultiple method. It keeps the totals automatically. The SourceGrid and SourceField options must be set for it to function. If they are not set then the contents of the Text property will be displayed.

 It can also output text aligned any way desired and has full color capabilities. By setting the property ShowOn , the component knows on which pages of the printout it must appear and on which not. It hides or shows itself automatically. By setting the property ShowOnForm, the programmer can determine if the component should appear on the form that is displayed to the end-user.

The TotalType property indicate what output should be shown. The DisplayFormat property is used mainly for formatting currency and integer fields. The Alignment property indicates how the contents should be aligned within the border.


GetRunningTotal
GetRunningTotal Method

Applies to

TPrintWin Component

Declaration

function  GetRunningTotal  ( Grid: TCustomGrid; ColumnName: string): Real;

Description

Returns a running total of a column in a TDBGrid of all the previous pages plus the current one. The total is already available at the beginning of the page. This option is used together with the DrawWindowMultiple method which is used to print Invoices, statements ,etc. The total is also available if a TShowTotal component is used.


Font
Font Property

Applies to

TShowTotal Component

Declaration

property Font: TFont

Description

Indicates the font which will be used to display text in the component.


GridBackDrop
GridBackDrop Property

Applies to

TPrintWin Component

Declaration

property GridBackDrop: Boolean;

Description

Indicate if grid rulers should be printed on the output. This is handy for designing the layout of the printed page. It is used together with GridBackDropUnits


TPrintWin Methods DrawQueryRecord
DrawQueryRecord Method

Applies to

TPrintWin Component

Declaration

procedure DrawQueryRecord( XOffset: Real;  YOffset: Real;  Query TQuery);

Description

The DrawQueryRecord method draw the the current record of the Query vertically starting at position (XOffset, YOffset). Measurements are in Inches or Centimetre depending on the setting of Units.


HeaderStringCenter
HeaderStringCenter Property

Applies to

TPrintWin component

Declaration

property HeaderStringCenter: string;

Description

Indicates the string that will be printed in the top center of the page.


Print Viewer

The PrintViewer is built into the PrintIt! components and can  view and print files that are generated by PrintIt!. It is called from within the PrintIt! components.

It looks in the current directory for all metafiles beginning with PRN and displays them on the screen. It has built in functions like ZOOM, PAN etc.

The following settings can be done from a TPrintWin which customizes the Print Viewer. ViewBkColor and ViewHeading.


ShowOnForm
ShowOnForm Property

Applies to

TShowTotal Component

Declaration

property ShowOnForm: Boolean;

Description

Indicates if the component should be shown on the form.


DisplayFormat
DisplayFormat Property

Applies to

TShowTotal Component

Declaration

property DisplayFormat: string;

Description

Indicates the format a TDBGrid field will be displayed. Used primarily for real and Integer fields together with the DrawWindowMultiple method.


Interrupted
Interrupted Property

Applies to

TPrintWin Components

Declaration

property Interrupted  Boolean;

Description

Indicates if the prepare of the printout or the printing on the printer was interrupted. Default is False.


TOrient
TOrient Type

Unit

CB_Types

Declaration

property Orientation TOrient;

Description

Indicates the orientation of the output on either the Viewer or the printer.

This can take on the following values

Value	Meaning

Default	The print job uses the previous setting of the orientation

Landscape	The print job prints horizontally on the page

Portrait.	The print job prints vertically on the page

Note: If this value is to be set during runtime, call it before calling BeginPrint

TOrient


Orientation
Orientation Property

Applies to

TPrintWin components

Declaration

property Orientation TOrient;

Description

Indicates the orientation of the output on either the Viewer or the printer.

This can take on the following values

Value	Meaning

Default	The print job uses the previous setting of the orientation

Landscape	The print job prints horizontally on the page

Portrait.	The print job prints vertically on the page

Note: If this value is to be set during runtime, call it before calling BeginPrint


PageNumberEnabled
PageNumberEnabled Property

Applies to

TPrintWin components

Declaration

property PageNumberEnabled Boolean

Description

Indicates if the Page Number must appear on the right bottom of the printout. The default value is True


YOffset
YOffset Property

Applies to

TVRuler  component

Declaration

property YOffset: Real;

Description

Indicates the distance from the top of the parent window. If negative then only the positive part of the ruler will be displayed. It displayes measurements in Inches or Centimetre depending on the settings of the Units property.


Text
Text Property

Applies to

TShowTotal Component

Declaration

property Text:  string;

Description

Indicates the text that will be displayed in the component.


HeaderStringRight
HeaderStringRight Property

Applies to

TPrintWin component

Declaration

property HeaderStringRight: string;

Description

Indicates the string that will be printed in the right top corner of the page.


DrawGrid
DrawGrid Method

Applies to

TPrintWin Component

Declaration

procedure DrawGrid( x, y: Integer; Width, Height: Real;  xDim, yDim: Integer);

Description

Draws a grid with the top left at x,y. Each block is Width wide and Height high. XDim x yDim is the dimension of the Grid.

Measurements are in Inches or Centimetre depending on the setting of Units.


BitBlt
BitBlt Method

Applies to

TPrintWin Component

Declaration

procedure  procedure BitBlt(XOffset: Real;  YOffset: Real;  Width: integer;Height: Real;  FileName: String);

Description

Draws a Bitmap by using a file as defined in FileName. If Width and Height are both 0 then then Height and Width of the bitmap will be used as read from the file.

If Height and Width are not 0 then the bitmap will be stretched to fit the rectangle

Measurements are in Inches or Centimetre depending on the setting of Units.


DrawWindow Supported Components

The following basic components can be drawn onto the printer:

TEdit,

TDBedit

TMaskEdit,

TLabel,

TDBText,

TMemo,

TDBMemo,

TCombobox,

TDBCombobox

TDBLookupCombo,

TDBGrid,

TImage,

TDBImage,

TBevel,

TPanel,

TForm,

TScrollBox

TShape,

TGroupBox,

TRadioGroup,

TCheckBox,

TRadioButton,

TStringGrid

TNoteBook (ActivePage)

In most cases the properties of the components themselves are used e.g. the fonts and colors. Component contents cannot continue onto the next page so they must fit in a single page.

The exception is the following:

The DrawWindowMultiple allows the contents of a TDBGrid to continue onto the next page. This is used mainly for printing Invoices, Job Cards, statements etc. The Invoice or statement page is setup using the normal Delphi interface by creating the form on the screen. A new component has been added which displays page and running totals which are automatically calculated by TPrintWin. This component is the TShowTotal component. Page and running totals are available already at the beginning of the page so any necessary settings can be done in the OnPrintHeader event. All supported components will appear on all pages. The TShowTotal component can be made to appear on selected pages as selected by its ShowOn property.


HeaderStringLeft
HeaderStringLeft Property

Applies to

TPrintWin component

Declaration

property HeaderStringLeft: string;

Description

Indicates the string that will be printed in the left top corner of the page.


HeaderFont
HeaderFont Property

Applies to

TPrintWin Components

Declaration

property HeaderFont: TFont;

Description

Indicates the font that will be used to print the Header at the top of the page.


SourceField
SourceField Property

Applies to

TShowTotal Component

Declaration

property SourceField: string;

Description

Indicates a FieldName in the TDBGrid. The TShowTotal component will display either a PageTotal or a Running total depending on the setting of the  TotalType property. It is ONLY used together with the DrawWindowMultiple method of TPrintWin. The SourceGrid property must also be set. If this property is used then property TotalType should be set to either tPageTotal (which will display the PageTotal for the specific field) or to  tAccTotal (which will display a running total of the specific field). These totals are calculated at the beginning of the page.


BorderStyle
BorderStyle Property

Applies to

TShowTotal Component

Declaration

property BorderStyle: TBorderStyle;

Description

Indicates if a border should be drawn around the edge of a component. It can be bsNone or bsSingle.


DrawWindowMultiple
DrawWindowMultiple Method

See also

SetColumnWidth	GetPageTotal,  GetRunningTotal, TShowTotal, THRuler, TVRuler

Applies to

TPrintWin Component

Declaration

procedure    DrawWindowMultiple( XOffset, YOffset: Real; Control: TWinControl);

Description

The DrawWindowMultiple is used to print forms like Invoices, Job Cards, statements etc. It automatically determines if it must go over onto multiple pages. It usually works together with the TShowTotal component to enhance its capabilities. To print a multiple page Invoice, etc. requires no more than a few lines of programming - usually +- 10. To accomplish this, eveything is set with properties.

The XOffset and YOffset parameters are used to offset the page on the printer. These measurements are in Inches or Centimetre depending on the setting of Units.

The Control can be any of the following:

TForm,

TPanel

TScrollBox

All descendents will be drawn except components like buttons, scrollboxes, scrollbars, checkboxes, etc. See the list of currently supported components .


TShowTotal Properties

SourceGrid

SourceField

BorderStyle

Color

Font

Visible

TotalType

DisplayFormat

Text

ShowOn

Alignment

ShowOnForm


GetTextHeight
GetTextHeight Method

Applies to

TPrintWin Component

Declaration

function GetTextHeight (str: string): Real;

Description

Returns the Height of the string in Inches or Centimetre depending on the setting of Units.


GetControlWidth
GetControlWidth Method

Applies to

TPrintWin Component

Declaration

function GetControlWidth (Control: TWinControl): Real;

Description

Returns the Width of the control in Inches or Centimetre depending on the setting of Units.


GetControlHeight
GetControlHeight Method

Applies to

TPrintWin Component

Declaration

function GetControlHeight (Control: TWinControl): Real;

Description

Returns the Height of the control in Inches or Centimetre depending on the setting of Units.


GetPageHeight
GetPageHeight Method

Applies to

TPrintWin Component

Declaration

function  GetPageHeight: Real;

Description

Returns the Height of the Page in Inches or Centimetre depending on the setting of Units.


GetPageWidth
GetPageWidth Method

Applies to

TPrintWin Component

Declaration

function  GetPageWidth: Real;

Description

Returns the Width of the Page in Inches or Centimetre depending on the setting of Units.


Support
Support Information

Support is available from the following:

E-mail:	Johan.Calitz@kagi.com

Internet home page	http://ourworld.compuserve.com/homepages/calitz

Fax	+27 12 342 5269